home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************
- File Name: NBX_DEMO.C
- Expanded Name: Notify Box Demo
- Description: Demo program for NotifyBox function.
- This program demonstrates the windows
- MessageBox function and a similar
- NotifyBox function. Both are
- demonstrated with a very simple
- program that does not even register a
- main window!
- Program List: NBX_TEST.C NTFY_BOX.C
- Global Function List: WinMain
- Static Function List:
- Local Macro List:
- Global Data:
- Static Data:
- Portability: MS Windows, Any memory model,
- Any windows compatable C Compiler
- **********************************************************/
-
- /* MS Windows */
- #include <windows.h>
-
- /* Types and prototypes */
- #include <ntfy_box.h>
-
- int PASCAL WinMain( HANDLE hInstance, HANDLE hPrevInstance,
- LPSTR lpszCmdLine, int nCmdShow )
- {
-
- LONG i;
-
- /* Prompt user to start */
- MessageBox( NULL, "Demonstration of NotifyBox "
- "function.\nHit Enter to begin a long "
- "process", "MessageBox", MB_OK );
-
- /* Create Notify Box */
- NotifyBox( NULL, "Doing a long process - looping "
- "10,000,000 (ten million) times!\n\n"
- "Please Wait...", "NotifyBox",
- hInstance );
-
- /* Do a long process */
- for ( i = 0; i < 10000000; i++ );
-
- /* Destroy Notify Box */
- NotifyBox( NULL, NULL, NULL, NULL );
-
- /* Prompt user to exit program */
- MessageBox( NULL, "Long process is over - NotifyBox "
- "has been destroyed.\nHit Enter to exit",
- "MessageBox", MB_OK );
-
- return ( 0 );
-
- } /* WinMain */
-